package com.chenhs.oop.study.反射;

import com.chenhs.oop.study.自定义注解.MyAnnotation;

/**
 * <ul>peanut 学习
 * <li> Author:      chenhs</li>
 * <li>E-Mail:    </li>
 * <li> Date:     2021/6/5 - 14:14</li>
 * <li>Description:        注释  </li>
 * <li>+-History-------------------------------------+</li>
 * <li>| Date          Author       Description    </li>
 * <li>|2021/6/5 - 14:14         chenhs       Created   </li>
 * <li>+------------------------------------------------</li>
 * </ul>
 */
@MyAnnotation
public class User {
	
	public User(String name, Integer age) {
		this.name = name;
		this.age = age;
	}
	public User() {
	
	}
	@MyAnnotation
	private String name;
	
	private Integer age;
	

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getAge() {
		return age;
	}
	
	public void setAge(Integer age) {
		this.age = age;
	}
	
	@Override
	public String toString() {
		return "User{" + "name='" + name + '\'' + ", age=" + age + '}';
	}
	@MyAnnotation
	public void speak(String content){
		System.out.println(name+"说："+content);
	}
    @MyAnnotation
	public void speak( ){
		System.out.println(name+"说：你的代码写的真棒。");
	}
}
